<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>设备类别表</title>
		<link rel="stylesheet" type="text/css" href="../../../resource/css/bootstrap.css">
		<link rel="stylesheet" type="text/css" href="../../../resource/css/user_css/publicStyle.css">
		<link rel="stylesheet" type="text/css" href="../../../resource/layui/css/layui.css"/>
		<link rel="stylesheet" type="text/css" href="../../../resource/css/niubility.css"/>
		<!-- 购入、调入,调出，维修维护，报损报废相同的css样式 -->
		<link rel="stylesheet" type="text/css" href="../../../resource/css/user_css/purchase_diaoRu_style.css"/>
		<script type="text/javascript" src="../../../resource/layui/layui.js"></script>

	</head>
	<body>
		<form action="" method="post" id="formAddDevice">
			<div class="boxOne">
				<div class="form-group">
			      	<label>设备类别名称:</label>
				    <select  class="form-control" name="equipmentCategoryNo" id="equipmentCategory">
					  <option value="-1">---未选择---</option>
					</select>
		      	</div>
				<div class="form-group">
					<label for="equipmentName">设备名字:</label>
					<input type="text" class="form-control" name="equipmentName" id="equipmentName" >
				</div>
		      	<div class="form-group">
			      	<label>存放场所:</label>
				    <select  class="form-control" name="placeNo" id="place">
					  <option value="-1">---未选择---</option>
					</select>
		      	</div>
		      	<div class="form-group">
		      	  <label for="number">数量:</label>
		          <input type="number" class="form-control" name="number" id="number"  min="1" max="3" value="1"/>
		    	</div>
		    	<div class="form-group">
		      	  <label for="price">单价:</label>
		          <input type="text" value="" class="form-control" name="price" id="price">
		    	</div>
			</div>
			<div class="boxOne">
		    	<div class="form-group">
		      	  <label for="type">型号:</label>
		          <input type="text" class="form-control" name="type" id="type"  placeholder="可选填"/>
		    	</div>
		    	<div class="form-group">
		      	  <label for="guiGe">规格:</label>
		          <input type="text" class="form-control" name="guiGe" id="guiGe"  placeholder="可选填"/>
		    	</div>
				<div class="form-group">
					<label for="manufacturerNo">制造号:</label>
					<input type="text" class="form-control" name="manufacturerNo" id="manufacturerNo"  placeholder="可选填" />
				</div>
				<div class="form-group">
		      	  <label for="shippingNo">出货票号码:</label>
		          <input type="text" class="form-control" name="shippingNo" id="shippingNo"   placeholder="可选填"/>
		    	</div>
		    	<div class="form-group">
		      	  <label for="remark">备注:</label>
				  <textarea style="height: 38px;" class="form-control" name="remark" id="remark"  placeholder="可选填"></textarea>
				</div>
			</div>
			<div class="boxOne">			
		    	<div class="form-group">
		      	  <label for="deliveryUnit">供货单位:</label>
		          <input type="text" class="form-control" name="deliveryUnit" id="deliveryUnit"  placeholder="可选填"/>
		    	</div>
		    	<div class="form-group">
		      	  <label for="purchaseDate">进货日期:</label>
		          <input type="date" class="form-control" name="purchaseDate" id="purchaseDate">
		    	</div>
		    	<div class="form-group">
		      	  <label for="application">用途:</label>
		          <input type="text" class="form-control" name="application" id="application"  placeholder="可选填"/>
		    	</div>
		    	<div class="form-group">
		      	  <label for="manufacturer">出产厂家:</label>
		          <input type="text" class="form-control" name="manufacturer" id="manufacturer"  placeholder="可选填"/>
		    	</div>
		    	<div class="form-group">
					<label for="equipmentNo"><a title=" 如果添加多个,请以“逗号为分隔符” ">设备编号：</a> <i class="layui-icon jia" style="font-size: 18px; color:#999999;">&#xe61f;</i></label>
		          <input type="text" class="form-control" name="equipmentNo" id="equipmentNo">
		          <div id="bianhao"></div>		          		          			         		   	         
		    	</div>   	
			</div>
			<div class="boxOne">
				<div class="form-group">
					<label for="attachmentName">附件名称:</label>
					<input type="text" class="form-control" name="attachmentName" id="attachmentName"  placeholder="可选填"/>
				</div>
				<div class="form-group">
					<label for="attachmentGuiGe">附件规格:</label>
					<input type="text" class="form-control" name="attachmentGuiGe" id="attachmentGuiGe" placeholder="可选填"/>
				</div>
				<div class="form-group">
					<label for="application">附件数量:</label>
					<input type="text" class="form-control" name="attachmentNumber" id="attachmentNumber"  placeholder="可选填"/>
				</div>
				<div class="form-group">
					<label for="leaderOfUserUnit">使用单位负责人:</label>
					<input type="text" class="form-control" name="leaderOfUserUnit" id="leaderOfUserUnit"  placeholder="可选填"/>
				</div>
				<div class="form-group">
					<label for="purchaser">采购人:</label>
					<input type="text" class="form-control" name="purchaser" id="purchaser" placeholder="可选填"/>
				</div>
			</div>
			<div class="boxOne">
			<div class="form-group">
				<label for="acceptor">验收人:</label>
				<input type="text" class="form-control" name="acceptor" id="acceptor"  placeholder="可选填"/>
			</div>
			<div class="form-group">
				<label for="bookkeeper">记账人:</label>
				<input type="text" class="form-control" name="bookkeeper" id="bookkeeper" placeholder="可选填"/>
			</div>
			<div class="form-group">
				<label>利用率模板:</label>
				<select  class="form-control" name="utilizationTemplateNo" id="utilizationTemplate">
					<option value="-1">---未选择---</option>
				</select>
			</div>
		</div>
		  <div style="clear: both;"></div>
	      <button type="button" id="btn" class="btn btn-default">提交</button>
		</form>
		<script type="text/javascript" src="../../../resource/js/jquery.min.js" ></script>
		<!--在Ajax请求发送之前引入静态路径文件-->
		<script src="../../../resource/js/static_url.js"></script>
		<!-- 设备类别名、存放场所 js  -->
		<script type="text/javascript" src="../../../resource/js/user_js/gouRuDiaoRu.js"></script>
		<!--表单验证：购入、调入 公共部分-->
		<script type="text/javascript" src="../../../resource/js/user_js/User_form_verification.js"></script>
		<!-- 表单序列化提交：购入、调入、调出、维修维护、报损报废、装让 -->
		<script type="text/javascript" src="../../../resource/js/user_js/user_post_serialize.js"></script>
		<!--表单验证-->
		<script type="text/javascript">
			$("#btn").click(function(){
				// ------表单验证函数： 购入 和 调入 共同部分----------
                check_submit_form(user_purchase_post);
			});
            $("#equipmentNo").focus(function(){
                layui.use("layer",function(){
                    layer.tips('输入设备编号后，请点击加号添加！如有多个设备编号，请以逗号分隔开', '#equipmentNo', {
                        tips: [2, '#333333'],
                        time: 4000
                    });
                });
            })
			// 设置默认时间
			var myDate = new Date();
			var year = myDate.getFullYear();
			var month = myDate.getMonth()+1;
			var day = myDate.getDate();
			//判断 月份、天数 <10的时候前面加 0
			if(month < 10){
				month = "0"+month;
			}
			if(day < 10){
				day = "0"+day;
			}
			var time = year +"-"+ month +"-"+ day;
			$("#purchaseDate").val(time);

			//
		</script>
	</body>
</html>
